<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="">
        <meta name="author" content="">
        <!-- <link rel="icon" href="../../favicon.ico"> -->
        <title>Research Show Time</title>

        <link href="../libs/bootstrap/css/bootstrap.min.css" rel="stylesheet">
        <link href="../css/public.css" rel="stylesheet">
        <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
            <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
            <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
    </head>

    <body>

        <nav class="navbar navbar-inverse navbar-fixed-top">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="#">Research WoW</a>
                </div>
                <div id="navbar" class="collapse navbar-collapse">
                    <ul class="nav navbar-nav">
                        <li class="active"><a href="index.html">Home</a></li>
                        <li><a href="#about">About</a></li>
                        <li><a href="#contact">Contact</a></li>
                    </ul>
                </div><!--/.nav-collapse -->
            </div>
        </nav>

        <div class="container res-index">

            <div class="panel panel-primary">
                <div class="panel-heading">
                    <h3 class="panel-title">Video Files List</h3>
                </div>
                <div class="panel-body">
                    <ul class="list-group res-searchList">

                    </ul>
                </div>
            </div>

        </div><!-- /.container -->


        <!-- Bootstrap core JavaScript
            ================================================== -->
            <script src="../libs/jquery.min.js"></script>
            <script src="../libs/bootstrap/js/bootstrap.min.js"></script>
            <script type="text/javascript">
        $(function(){
            $.ajax({
                "url":"/list?_t="+new Date().getTime(),
                dataType:'json',
                success:function(data){
                    _dealData(data);
                }
            });
        });
        function _dealData(list){
            var str = "";
            $.each(list,function(i,item){
                str += '<li class="list-group-item"><a href="list.html?id='+item.index+'">'+item.filename+'</a></li>';
            });
            $('.res-searchList').append(str);
        }
            </script>
    </body>
</html>
